﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using CodeGame.Networking.Clientside;
using CodeGame.Networking.Clientside.ServerClientPackets;

using LuaInterface;

namespace CodeGame.LuaLibary
{
    internal static class luaLib_network
    {
        [LuaHelp("Adds a hook for a custom network message")]
        public static void addHook(int id, LuaFunction func)
        {
            ScriptedPacket.AddHook(id, new LuaHook(func));
        }

        [LuaHelp("Sends a lua message to the server")]
        public static void sendCustom(int id, string content)
        {
            ClientProtocolScripted.SendScriptedMessage(id, content);
        }
    }
}
